﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entities;
using System.Linq.Expressions;

namespace Datalayer
{
    public interface IQueryMgr : IDisposable
    {
        #region User
        List<User> UR_GetAllUser();
        User UR_GetUserByID(Guid pUserID);
        User UR_GetUserByUserName(String pUserName);
        User UR_GetUserByUsernameAndPassword(string pUsername, string pPassword);
        User UR_GetUserByUsernameAndEmail(string pUsername, string pEmail);
        void UR_NewUser(User pUser);
        void UR_EditUser(User pUser);
        void UR_DelOrResUser(Guid pUserID);
        #endregion

        #region Role
        List<Role> Ro_GetAllRole();
        Role Ro_GetRoleByID(Guid pRoleID);
        #endregion

        #region Depart
         List<Depart> Dep_GetAllDepart();
         Depart Dep_GetDepartByID(Guid pDepartID);
         void Dep_NewDepart(Depart pNew);
         void Dep_EditDepart(Depart pNew);
         void Dep_DelOrResDepart(Guid pNewID);
        #endregion

        #region Status
         List<Status> Sta_GetAllStatus();
         Status Sta_GetStatusByID(Guid pStatusID);
        #endregion

        #region Identification
        List<Identification> Iden_GetAllIdentification();
        Identification Iden_GetIdentificationByID(Guid pIdenID);
        #endregion

        #region News
         List<New> News_GetAllNew();
         List<New> News_GetAllNew_search(String strSearch);
         List<New> News_GetNewByCatID(Guid catid);
         List<New> News_GetNewByCreateBy(Guid CreateBy);
         List<New> News_GetNewByModifyBy(Guid ModifyBy);
         New News_GetNewByID(Guid pNewID);
         List<New> News_GetHitTop10();
         List<New> News_GetNewsTop10();
         List<New> News_GetHitTop5();
         List<New> News_GetNewsTop5();
         List<New> News_GetNewsHot5();
         void News_NewNew(New pNew);
         void News_EditNew(New pNew);
         void News_DelOrResNew(Guid pNewID);
         void News_Hit(Guid pNewID);
        #endregion

        #region Cate
        List<Category> Ca_GetAllCate();
        List<Category> Ca_GetAllCate_NotParent();
        Category Ca_GetCateByID(Guid pCateID);
        List<Category> Ca_GetByCateParentID(Guid pCateParentID);
        void Ca_NewCate(Category pCategory);
        void Ca_EditCategory(Category pCategory);
        void Ca_DelOrResCategory(Guid pCategoryID);
        void Ca_NullParent(Category pCategory);
        void Ca_HaveParent(Category pCategory);
        #endregion

        #region Menu
        List<Menus> Menu_GetAllMenu();
        Menus Menu_GetMenuByID(Guid pMenuID);
        #endregion

        #region Webconfig
        WebConfig wcf_GetWebconfByID();
        void wcf_EditCategory(WebConfig pWebconfig);
        #endregion

        #region Comment
         List<Comment> CM_GetAllComment();
         List<Comment> CM_GetAllCommentByChecked();
         List<Comment> CM_GetCommentByCheckedby(Guid Checkedby);
         Comment CM_GetCommentByID(Guid pCommentID);
         void CM_NewComment(Comment pComment);
         void CM_EditComment(Comment pComment);
         void CM_DelOrResComment(Guid ComID);
        #endregion

        #region FileUpload
         List<FileUpload> FU_GetAllFileUpload();
         List<FileUpload> FU_GetFileUploadByCommentID(Guid CommentID);
         List<FileUpload> FU_GetFileUploadByDocumentID(Guid DocumentID);
         FileUpload FU_GetFileUploadByID(Guid pFileUploadID);
         void FU_NewFileUpload(FileUpload pFileUpload);
         void FU_EditFileUpload(FileUpload pFileUpload);
         void FU_DelOrResFileUpload(Guid FUID);
        #endregion

        #region Document
         List<Document> Doc_GetAllDocument();
         List<Document> Doc_GetDocumentByTypeDocID(Guid TypeDocID);
         Document Doc_GetDocumentByID(Guid pDocumentID);
         void Doc_NewDocument(Document pDocument);
         void Doc_EditDocument(Document pDocument);
         void Doc_DelOrResDocument(Guid DocID);
        #endregion

    }
}
